﻿package com.ufenlei.LTS{
	import flash.events.Event;
	import flash.text.TextField;
	import flash.display.MovieClip;
	import flash.text.TextFormat;
	
	public class TestingRadio extends RadioBox{
		protected var _alphaText:TextField;
		protected var _selectFormat:TextFormat = new TextFormat(null,null,0xffffff);
		protected var _unselectFormat:TextFormat = new TextFormat(null,null,0x666666); 
		
		public function TestingRadio(lbl:String ,idx:int= 0,  de:Boolean = false, lck:Boolean = false){
			super(lbl,idx,de,lck);
		}
		public function showKey():void{
		}
		protected function addAlphaField(tf:TextField):void{
			_alphaText = tf;
			_alphaText.text = String.fromCharCode(65+idx);
		}
		override public function select():void{
			this.value = true;
			var selectedEvent:Event = new Event("Input_INPUTSELECTED");
			this.dispatchEvent(selectedEvent);
			_alphaText.setTextFormat(_selectFormat);
			initView();
		}
		override public function unselect():void{
			this.value = false;
			var unselectedEvent:Event = new Event("Input_UNINPUTSELECTED");
			this.dispatchEvent(unselectedEvent);
			_alphaText.setTextFormat(_unselectFormat);
			this.initView();
		}
	}
}